import java.util.ArrayList;

/**
 * Project: SecuritySnort
 * This class takes care of stopping the capturing
 * of any packets.
 *
 * @author Jonathan Buttner
 * @version Jan 26, 2010
 */
public class StopLisCmd extends Command
{
	/**************************************************************************
	 * 							Globals
	 *************************************************************************/
	private CaptureCmd _capture;
	
	/**************************************************************************
	 * 							Constructors
	 *************************************************************************/
	/**
	 * This constructor sets the name of the command and sets up
	 * the needed objects.
	 * 
	 * @param capture is the object that is used to capture packets.
	 */
	public StopLisCmd( CaptureCmd capture )
	{
		_capture = capture;
		_name = "stoplis";
	}
	
	/**************************************************************************
	 * 							Public Methods
	 *************************************************************************/
	/**
	 * This method will stop the capturing of any packets.
	 * 
	 * @param command is the tokenized version of the command given
	 * by the user.
	 */
	public void exeCommand( ArrayList < String > command )
	{
		_capture.exeStop();
		//System.out.println( "\nCapturing packets has been stopped." );
	}
}
